import request from '@/utils/request'

export function login(data) {
  return request({
    url: 'login',
    method: 'post',
    data
  })
}

export function getInfo() {
  return request({
    url: 'userInfo',
    method: 'get'
  })
}

export function getIcon() {
  return request({
    url: 'GetIcon',
    method: 'get'
  })
}

export function getRouter() {
  return request({
    url: 'GetRouter',
    method: 'get'
  })
}

export function SystemInit() {
  return request({
    url: 'SystemInit',
    method: 'get'
  })
}

export function getMenu() {
  return request({
    url: 'MenuGet',
    method: 'get'
  })
}

export function MenuAddOrEdit(data) {
  return request({
    url: 'MenuAddOrEdit',
    method: 'put',
    data: data
  })
}

export function AdminUserEdit(data) {
  return request({
    url: 'AdminUserEdit',
    method: 'put',
    data: data
  })
}

export function AdminUserList(params) {
  return request({
    url: 'AdminUserList',
    method: 'get',
    params: params
  })
}

export function AdminUserGetRole() {
  return request({
    url: 'AdminUserGetRole',
    method: 'get'
  })
}

export function AdminUserDel(params) {
  return request({
    url: 'AdminUserDel',
    method: 'delete',
    params: params
  })
}

export function RoleEdit(data) {
  return request({
    url: 'RoleEdit',
    method: 'put',
    data: data
  })
}

export function ChangePsd(data) {
  return request({
    url: 'ChangePsd',
    method: 'put',
    data: data
  })
}

export function RoleList(params) {
  return request({
    url: 'RoleList',
    method: 'get',
    params: params
  })
}

export function RoleDel(params) {
  return request({
    url: 'RoleDel',
    method: 'delete',
    params: params
  })
}

export function RoleMenu(params) {
  return request({
    url: 'RoleMenu',
    method: 'get',
    params: params
  })
}

export function RoleMenuAuth(params) {
  return request({
    url: 'RoleMenuAuth',
    method: 'post',
    data: params
  })
}

export function MenuDel(params) {
  return request({
    url: 'MenuDel',
    method: 'delete',
    params: params
  })
}

export function DictGet(params) {
  return request({
    url: 'DictGet',
    method: 'get',
    params: params
  })
}

export function DictDel(params) {
  return request({
    url: 'DictDel',
    method: 'delete',
    params: params
  })
}

export function DictuEdit(data) {
  return request({
    url: 'DictuEdit',
    method: 'put',
    data: data
  })
}
